{% set seq = 0 %}

{% if not questions %}

    <div class="empty">解析失败</div>

{% else %}

    {% for type, typeQuestions in questions %}
    	
    	{% for question in typeQuestions %}
    		{% set seq = seq + 1 %}

    		{% if question.type in ['single_choice', 'uncertain_choice'] %}
    			{% set type = 'choice' %}
    		{% else %}
    			{% set type = question.type %}
    		{% endif %}
    		
    		{% include 'QuestionPlusBundle:Question:' ~ type ~ '.html.twig' %}

    	{% endfor %}

    {% endfor %}

    <a class="btn btn-default btn-block" id="show-more-btn">显示更多</a>

    <hr>
    <button class="btn btn-fat btn-primary pull-right" id="import-btn" data-reading-text="正在导入..." data-error-text="导入失败" data-url="{{ path('question_import', {courseId: course.id}) }}">导入</button>
    <script type="text/plain" id="questions">{{ questions|json_encode|raw }}</script>

    <script>app.load('questionplusbundle/controller/question-plumber/import-modal')</script>

{% endif %}